Knowledgebase with GPT V4

Knowledgebase with GPT V4 combines Druid’s Knowledge Base capabilities with the power of DRUID LLMs (Druid Becus and Azure OpenAI model gpt-4o-mini) to deliver accurate, conversational answers in real time without requiring users to browse through multiple articles.

The solution is perfect for teams looking to streamline information access, improve support efficiency, and get clear visibility into how their AI Agent handles real-world questions.

What’s New in Version 9.18

  • Voice AI Agent Support. The KB Toolkit can now be used for both text and voice AI Agents, expanding its applicability beyond text-based interactions.
  • NOTE: When using the KB Toolkit solution for a voice AI Agent, you must activate the AudioCodes channel.

Key Features and Components

This solution introduces intelligent fallback handling and powerful analytics:

  • If a user’s intent is recognized, the system returns the best match from the KB.
  • If the intent is not recognized, the system uses Druid LLM general-purpose gpt-4o-mini model to generate a relevant answer — still using your business context.
  • Built-in intent logging and reporting lets you see exactly how each question was answered (by KB, flow, or GPT) and track performance trends over time.
  • Includes specialized agents like Rephrase, AskGPT, and Intent Not Recognized to manage different types of queries.

This solution also includes the KB Agent Workspace, where you can:

  • Track all intents
  • View and export collected user feedback
  • Access detailed reports on KB agent usage.

Prerequisites

  • Tenant Druid community (open new tenant here) or Druid subscription.
  • You should have a published AI Agent. For information on how to create an AI Agent, see Creating AI Agents.
  • You should have the API Resources for Druid WebView and Druid Data Service enabled on your tenant. Contact your Druid sales representative to enable them. Then, activate the Druid Data Service in your tenant by navigating to Administration > Settings > Druid Data Service, and selecting Is enabled and clicking the Save all button at the top right of the page.
  • Druid LLM API resources must be activated for DRUID Becus and AzureOpenAi/gpt-4o-mini on your tenant. Contact your Druid sales representative to enable DRUID-dedicated resources and generate API tokens for Druid.LLM.

Configuring the solution

To configure the solution, follow these steps:

Step 1. Install the solution from the Solutions Library

Go to the Solutions Library, search for solution "Knowledgebase with GPT V4" and import it following the instructions provided in section Installing Solution Templates.

Wait until the import status shows as “Success”.

Step 2. Install the custom solution from the Solutions Library

Go to the Solutions Library, search for solution "Knowledgebase with GPT V4 Custom" and import it following the instructions provided in section Installing Solution Templates.

Wait until the import status shows as “Success”.

Step 3. Publish your changes and train your AI Agent

The Knowledgebase with GPT V4 – Custom solution allows you to tailor the Knowledge Base flows to meet your AI Agent specific needs.

NOTE: Best practice: Instead of modifying the solution flows directly, clone the existing flows and create custom versions based on them. This ensures that your changes are preserved and prevents conflicts during future solution upgrades.

After you make the desired changes, train the AI Agent.

Step 4. Set up the AI Agent and KB special flows

Go to the AI Agent settings, Details page and click the Dialog management section header. The section expands. Select the following special flows belonging to the custom solution you imported from the Solution Library, as follows:

Special Flow

Select

Intent not found flow Intent-not-recognized V4 - custom
Knowledge Base response flow Knowledge-Base-response-flow-agent V4 - custom

Intent rephrase flow

Intent rephrase flow V4 - custom

Tap on Use Knowledge Base.

Scroll down and click Save & Close.

Step 5. Enable Feedback Reactions in Web Chat

Users can provide positive or negative feedback using thumbs-up or thumbs-down emojis, helping you enhance AI Agent interactions and improve the user experience.

While the solution contains the flow for feedback collection, you need to enable feedback reactions.

To enable feedback reactions in web chat, follow these steps:

  1. Go to the AI Agent details page.
  2. Click Theme and navigate to the Webchat snippet section.
  3. Click Customize webchat and search for Show Actions for AI Agent Messages (botActivitiesActionsEnabled).
  4. Select the option to enable it.
  5. Click on Custom Handlers and in the Webchat Event Handlers (webChatEventHandler) field, enter the following code:
  6. Copy
    (action, currentDruidState) => {
                            if (action.type === 'DIRECT_LINE/INCOMING_ACTIVITY' && DruidWebchat_v2.isNewActivity(currentDruidState, action.payload.activity)) {
                            if(action.payload.activity.type == "event" && action.payload.activity.name == "_positive_feedback_") {
                            DruidWebchat_v2.sendMessage("&#x1F44D");//replace the code between "" with the thumbs up emoji
                            };
                            if(action.payload.activity.type == "event" && action.payload.activity.name == "_negative_feedback_") {
                            DruidWebchat_v2.sendMessage("&#x1F44E");//replace the code between "" with the thumbs down emoji
                            }        
                            }
                        }

  7. Click the Save button at the top right-corner of the pop-up.
  8. Save the AI Agent.

Step 6. Customize AI Agent Responses Using Variables

To customize how the agent responds, navigate to the Instructions step in the flow Knowledge-Base-response-flow-agent V4 - custom and adjust the following variables:

Variable Default value Description
[[KBResponse]].IncludeCitations true If true, each response will show the source of the information received.
[[KBResponse]].IncludeFeedback true If true, each response will have thumbs up and thumbs down for feedback.
[[KBResponse]].IncludeFollowUpQuestion true If true, each response will have a follow-up question, related to the topic discussed.
[[KBResponse]].IncludeRecomendedInsights false If true, the AI Agent offers advice to the end user, based on the information found in the knowledge base.
@UseGraph false If true, the AI Agent can connect to the entity graph, if available at AI Agent level.
@DataRetrievalPrompt Builds instructions telling an AI how to generate and run a SQL Server Graph query, and takes action if @UseGraph == True.
@KeywordDictionary The user can define a specific dictionary with abbreviations for the AI Agent to use in conversations.

The flow OpenAI-response V4 - custom exposes a similar set of variables in its Instructions step. Configure them the same way as above to control response behavior for the OpenAI flow, noting the channel-specific restrictions.

Variable Default value Description
[[KBResponse]].IncludeCitations true If true, each response will show the source of the information received.
[[KBResponse]].IncludeFeedback true If true, each response will have thumbs up and thumbs down for feedback. Applies only to the Directline channel.
[[KBResponse]].IncludeFollowUpQuestion true If true, each response will have a follow-up question, related to the topic discussed.
[[KBResponse]].IncludeRecomendedInsights false If true, the AI Agent offers advice to the end user, based on the information found in the knowledge base. Applies only to the Directline channel.